﻿<%@ page language="C#" autoeventwireup="true" inherits="CustomerMgr, HF.Business.UI.Sale_deploy" %>

<%@ Register Assembly="YYWebControl" Namespace="YYWebControl.YYSimpleCalendar" TagPrefix="YYWebControl" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>客户信息管理</title>
    <LINK href="css/hfmanger.css" type="text/css" rel="stylesheet">
    <LINK href="css/subModal.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="js/common.js"></script>
    <script type="text/javascript" src="js/subModal.js"></script>
<script>
function btnAddCustomer_onclick() {
showPopWin('增加客户信息','CustomerEdit.aspx', 600, 500, null);
}
 function CheckAll(oCheckbox) 
           { 
               var GridView2 = document.getElementById("<%=gvCustomer.ClientID %>"); 
               for(i = 1;i < GridView2.rows.length; i++) 
               { 
                   GridView2.rows[i].cells[0].getElementsByTagName("INPUT")[0].checked = oCheckbox.checked; 
               } 
           } 
</script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table  width="100%">
            <tr>
                <td align="left" class="toolbar" colspan="3" style="height: 23px" valign="middle">
                    <asp:Image ID="Image1" runat="server" ImageUrl="images/rss_2.gif" /><strong>客户信息管理</strong></td>
            </tr>
            <tr>
                <td align="left" colspan="3" style="height: 15px" valign="middle">
                </td>
            </tr>
            <tr>
            <td align=center><table style="width:98%">
                <td align="left" class="listContent" colspan="3" style="height: 23px" valign="middle">
                    &nbsp;<asp:Button ID="btnDelete" runat="server" OnClick="btnDelete_Click" Text="删除" CssClass="btn" OnClientClick="return confirm('确定删除吗？')"/>
                    <asp:RadioButton ID="rbtCode" runat="server" Checked="True" EnableViewState="False"
                                        GroupName="1" meta:resourcekey="RadioButton1Resource1" Text="编号" />
                                    <asp:RadioButton ID="rbtCaption" runat="server" GroupName="1" meta:resourcekey="RadioButton2Resource1"
                                        Text="名称" />
                                    <asp:TextBox ID="tbxSearch" runat="server" meta:resourcekey="TextBox5Resource1"></asp:TextBox>
                                    <asp:Button ID="btnSearch" runat="server" meta:resourcekey="Button1Resource2" OnClick="btnSearch_Click"
                                        Text="查询" CssClass="btn" />
                    <input id="btnAddCustomer" type="button" value="增加客户" language="javascript" onclick="return btnAddCustomer_onclick()" class="btn" style="width: 61px"  /></td>
                    </table>
                    </td>
            </tr>
            <tr>
                <td colspan="3" align=center>
                <table style="width:98%"><tr><td class="listContent">
                    <asp:GridView ID="gvCustomer" runat="server" AutoGenerateColumns="False" CellPadding="4"
                        ForeColor="#333333" GridLines="Horizontal" PageSize="20" DataKeyNames="Customer_Code">
                        <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="Black" />
                        <Columns>
                            <asp:TemplateField HeaderText="全选">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="ItemCheckBox" runat="server" />
                                </ItemTemplate>
                                <ItemStyle Width="80px" />
                                <HeaderTemplate>
                                    <input id="Checkbox1" type="checkbox" onclick="CheckAll(this)" />全选
                                </HeaderTemplate>
                            </asp:TemplateField>
                            <asp:HyperLinkField DataNavigateUrlFields="Customer_Code" DataNavigateUrlFormatString="CustomerEdit.aspx?Customer_Code={0}&amp;state=编辑"
                                DataTextField="Customer_Code" HeaderText="客户编号" Target="_blank">
                                <ItemStyle Width="100px" />
                            </asp:HyperLinkField>
                            <asp:BoundField DataField="Customer_Caption" HeaderText="客户名称">
                                <ItemStyle Width="300px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CustClassName" HeaderText="类型">
                                <ItemStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Customer_Linker" HeaderText="联系人">
                                <ItemStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Customer_Tel" HeaderText="电话">
                                <ItemStyle Width="150px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Customer_Status" HeaderText="状态" >
                                <ItemStyle Width="50px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Customer_Used" HeaderText="有效" >
                                <ItemStyle Width="50px" />
                            </asp:BoundField>
                            <asp:HyperLinkField DataNavigateUrlFields="Customer_Code" DataNavigateUrlFormatString="CustomerEdit.aspx?Customer_Code={0}&amp;state=编辑"
                                HeaderText="操作" Target="_blank" Text="详细">
                                <ItemStyle Width="100px" />
                            </asp:HyperLinkField>
                        </Columns>
                        <RowStyle BackColor="#EFF3FB" />
                        <EditRowStyle BackColor="#2461BF" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <PagerStyle ForeColor="Black" HorizontalAlign="Center" />
                        <HeaderStyle Font-Bold="False" ForeColor="Black" CssClass="gridHead" HorizontalAlign="Left" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView></td></tr></table>
                </td>
            </tr>
        </table>
    
    </div>
    </form>
</body>

</html>
